sgwt_kernel : Compute sgwt kernel function g=sgwt_kernel(x,varargin) This function will evaluate the kernel at input x Inputs : x - independent variable values Selectable Inputs : 'type' - 'abspline' gives polynomial / spline / power law decay kernel alpha,beta,t1,t2 - parameters for abspline kernel Outputs : g - array of values of g(x)
0001 % sgwt_kernel : Compute sgwt kernel 0002 % 0003 % function g=sgwt_kernel(x,varargin) 0004 % 0005 % This function will evaluate the kernel at input x 0006 % 0007 % Inputs : 0008 % x - independent variable values 0009 % Selectable Inputs : 0010 % 'type' - 'abspline' gives polynomial / spline / power law decay kernel 0011 % alpha,beta,t1,t2 - parameters for abspline kernel 0012 % 0013 % Outputs : 0014 % g - array of values of g(x) 0015 0016 % This file is part of the SGWT toolbox (Spectral Graph Wavelet Transform toolbox) 0017 % Copyright (C) 2010, David K. Hammond. 0018 % 0019 % The SGWT toolbox is free software: you can redistribute it and/or modify 0020 % it under the terms of the GNU General Public License as published by 0021 % the Free Software Foundation, either version 3 of the License, or 0022 % (at your option) any later version. 0023 % 0024 % The SGWT toolbox is distributed in the hope that it will be useful, 0025 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0026 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0027 % GNU General Public License for more details. 0028 % 0029 % You should have received a copy of the GNU General Public License 0030 % along with the SGWT toolbox. If not, see <http://www.gnu.org/licenses/>. 0031 0032 function g=sgwt_kernel(x,varargin) 0033 control_params={'gtype','abspline',... 0034 'a',2,... 0035 'b',2,... 0036 't1',1,... 0037 't2',2,... 0038 }; 0039 argselectAssign(control_params); 0040 argselectCheck(control_params,varargin); 0041 argselectAssign(varargin); 0042 0043 switch gtype 0044 case 'abspline' 0045 g=sgwt_kernel_abspline3(x,a,b,t1,t2); 0046 case 'mh' 0047 g=x.*exp(-x); 0048 otherwise 0049 error('unknown type') 0050 end 0051